#ifndef __SEMLOCK__H__
#define __SEMLOCK__H__

#include <sys/sem.h>

#ifdef __cplusplus
extern "C" {
#endif

union semun
{
	int val;
	struct semid_ds *buf;
	unsigned short *arry;
};

extern int semaphore_init(int);
extern int semaphore_release(int);
extern int semaphore_down(int);
extern int semaphore_up(int);

#ifdef __cplusplus
}
#endif

#endif